<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="animate.js"></script>
    <style>
        .sliderbar {
            position: absolute;
            left: 50%;
            top: 350px;
            margin-left: 897px;
            width: 60px;
            background-color: pink;
        }
        
        .con {
            display: none;
            position: relative;
            width: 200px;
            height: 30px;
            left: 0;
            top: 0;
            background-color: red;
        }
    </style>
</head>

<body>
    <div class="sliderbar">
        <span>⬅</span>
        <div class="con">问题反馈</div>
    </div>
    <script>
        var sliderbar = document.querySelector('.sliderbar');
        var con = document.querySelector('.con');
        sliderbar.addEventListener('mouseenter', function() {
            con.style.display = 'block';
            animate(con, -140, function() {
                sliderbar.children[0].innerHTML = '➡';
            });

        })
        sliderbar.addEventListener('mouseleave', function() {
            animate(con, 0, function() {
                sliderbar.children[0].innerHTML = '⬅';
                con.style.display = 'none';
            });
        })
    </script>
</body>

</html>